package com.jrx.anytxn.accounting.bean;

import java.math.BigDecimal;

/**
 * @program: anytxn-cf-accounting
 * @description:
 * @author: xiaoyu.jing
 * @date: 2019-11-29 11:35
 **/
public class DealBillBean {
    private int creditCount = 0;
    private int debitCount = 0;
    private BigDecimal debitAmount = BigDecimal.ZERO;
    private BigDecimal creditAmount = BigDecimal.ZERO;

    public int getCreditCount() {
        return creditCount;
    }

    public void setCreditCount(int creditCount) {
        this.creditCount = creditCount;
    }

    public int getDebitCount() {
        return debitCount;
    }

    public void setDebitCount(int debitCount) {
        this.debitCount = debitCount;
    }

    public BigDecimal getDebitAmount() {
        return debitAmount;
    }

    public void setDebitAmount(BigDecimal debitAmount) {
        this.debitAmount = debitAmount;
    }

    public BigDecimal getCreditAmount() {
        return creditAmount;
    }

    public void setCreditAmount(BigDecimal creditAmount) {
        this.creditAmount = creditAmount;
    }

    public void add(DealBillBean dealBillBean) {
        this.creditCount = this.creditCount + dealBillBean.getCreditCount();
        this.debitCount = this.debitCount + dealBillBean.getDebitCount();
        this.creditAmount = this.creditAmount.add(dealBillBean.getCreditAmount());
        this.debitAmount = this.debitAmount.add(dealBillBean.getDebitAmount());

    }
}
